import React from 'react'
import { connect } from 'dva'
import PropTypes from 'prop-types'
import { Button, Row, Col, Layout, Spin, Radio, Input, Form } from 'antd'
// import  createClass  from 'create-react-class'
import style from '../Login.less'
import { Link } from 'dva/router'
const FormItem = Form.Item
const RadioButton = Radio.Button
const RadioGroup = Radio.Group
// const { RangePicker } = DatePicker;

class RegistSecond extends React.Component {
  // const Regist = createClass
  // createClass function Regist(){
  constructor(props) {
    super(props)
    this.state = {
      data: [],
      list: []
    }
  }
  // static contextTypes = {
  // 	router: PropTypes.object
  // }
  componentWillMount() {
    // this.fetch(1);
    // console.log(this)
    // console.log(_current)
  }
  componentWillUnmount() {
    // this.reqwest_server.abort();
  }
  render() {
    const { decorator } = this.props
    return (
      <Row className={`${style.item}`}>
        <FormItem>
          {decorator('name', {
            rules: [{ required: true, message: '请输入姓名' }]
          })(<Input placeholder="姓名" />)}
        </FormItem>
        <FormItem label="选择角色">
          {decorator('mobile')(
            <RadioGroup size="large">
              <RadioButton value="a">Hangzhou</RadioButton>
              <RadioButton value="b">Shanghai</RadioButton>
              <RadioButton value="c">Beijing</RadioButton>
              <RadioButton value="d">Chengdu</RadioButton>
            </RadioGroup>
          )}
        </FormItem>
        <FormItem>
          {decorator('account')(<Input placeholder="企业 / 经销商名称" />)}
        </FormItem>
        <FormItem>
          <Button htmlType="submit" size="large" type="primary">
            提交
          </Button>
        </FormItem>
      </Row>
    )
  }
}

export default connect()(RegistSecond)
